<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>Document</title>
    <style>
        .box{width: 100px;height: 100px;background: blue;position:absolute;left:0;top:0;}
    </style>
</head>
<body>
    <div class="box"></div>
</body>
<script>

    var obox = document.querySelector(".box");

    window.onstorage = function(eve){
        var e = eve || window.event;
        var pos = JSON.parse(localStorage.getItem(e.key));
        
        obox.style.left = pos.x + "px";
        obox.style.top = pos.y + "px";
    }

</script>
</html>